From 321a553a6476f04163e1d5a67c2d15c8759285b7 Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Thu, 26 Jun 2025 14:50:27 +0100 Subject: [PATCH] [PATCH] Adjust timers from the correct thread PipeWireBaseEncodedStream moves the PipeWireProduce into another thread. It is therefore it's responsiblity to ensure that any calls into PipeWireProduce are run in the correct thread. This addresses a warning about timers. Gbp-Pq: Name upstream_9fe7a568_Adjust-timers-from-the-correct-thread.patch --- src/pipewirebaseencodedstream.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/pipewirebaseencodedstream.cpp b/src/pipewirebaseencodedstream.cpp index de51a90..b17ee1b 100644 --- a/src/pipewirebaseencodedstream.cpp +++ b/src/pipewirebaseencodedstream.cpp @@ -103,9 +103,13 @@ void PipeWireBaseEncodedStream::setMaxFramerate(const Fraction &framerate) } d->m_maxFramerate = framerate; - if (d->m_produce) { - d->m_produce->setMaxFramerate(d->m_maxFramerate); - } + // produce runs in another thread + QMetaObject::invokeMethod( + d->m_produce.get(), + [produce = d->m_produce.get(), framerate]() { + produce->setMaxFramerate(framerate); + }, + Qt::QueuedConnection); Q_EMIT maxFramerateChanged(); } -- 2.30.2